package cm.tl.pms.enums.base;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * "一级
 * 二级
 * 三级"
 */
@Getter
@AllArgsConstructor(access= AccessLevel.PRIVATE)
public enum SafeTypeEnum implements IEnum {
    FIRST_LEVEL("一级", 1),
    SECOND_LEVEL("二级", 2),
    THREE_LEVEL("三级", 3);
    private final String name;
    private final Integer value;

    public static SafeTypeEnum nameOf(Integer value) {
        for (SafeTypeEnum e : SafeTypeEnum.values()) {
            if (e.value.equals(value)) {
                return e;
            }
        }
        return null;
    }
}
